package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlOrderMapper;
import com.ruoyi.sl.domain.SlOrder;
import com.ruoyi.sl.service.ISlOrderService;

/**
 * 订单编号Service业务层处理
 * 
 * @author admin
 * @date 2024-06-18
 */
@Service
public class SlOrderServiceImpl implements ISlOrderService 
{
    @Autowired
    private SlOrderMapper slOrderMapper;

    /**
     * 查询订单编号
     * 
     * @param orderId 订单编号主键
     * @return 订单编号
     */
    @Override
    public SlOrder selectSlOrderByOrderId(Long orderId)
    {
        return slOrderMapper.selectSlOrderByOrderId(orderId);
    }

    /**
     * 查询订单编号列表
     * 
     * @param slOrder 订单编号
     * @return 订单编号
     */
    @Override
    public List<SlOrder> selectSlOrderList(SlOrder slOrder)
    {
        return slOrderMapper.selectSlOrderList(slOrder);
    }

    /**
     * 获取所有订单编号
     *
     * @return 订单编号集合
     */
    @Override
    public List<SlOrder> selectAllSlOrderList(){
        return slOrderMapper.selectAllSlOrderList();
    }

    /**
     * 新增订单编号
     * 
     * @param slOrder 订单编号
     * @return 结果
     */
    @Override
    public int insertSlOrder(SlOrder slOrder)
    {
        slOrder.setCreateTime(DateUtils.getNowDate());
        return slOrderMapper.insertSlOrder(slOrder);
    }

    /**
     * 修改订单编号
     * 
     * @param slOrder 订单编号
     * @return 结果
     */
    @Override
    public int updateSlOrder(SlOrder slOrder)
    {
        slOrder.setUpdateTime(DateUtils.getNowDate());
        return slOrderMapper.updateSlOrder(slOrder);
    }

    /**
     * 批量删除订单编号
     * 
     * @param orderIds 需要删除的订单编号主键
     * @return 结果
     */
    @Override
    public int deleteSlOrderByOrderIds(Long[] orderIds)
    {
        return slOrderMapper.deleteSlOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单编号信息
     * 
     * @param orderId 订单编号主键
     * @return 结果
     */
    @Override
    public int deleteSlOrderByOrderId(Long orderId)
    {
        return slOrderMapper.deleteSlOrderByOrderId(orderId);
    }
}
